Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

io.h

Go to the documentation of this file.
00001 /* -*- c -*- */
00002 #ifndef INCLUDED_LIB3DS_IO_H
00003 #define INCLUDED_LIB3DS_IO_H
00004 /*
00005  * The 3D Studio File Format Library
00006  * Copyright (C) 1996-2001 by J.E. Hoffmann <je-h@gmx.net>
00007  * All rights reserved.
00008  *
00009  * This program is  free  software;  you can redistribute it and/or modify it
00010  * under the terms of the  GNU Lesser General Public License  as published by 
00011  * the  Free Software Foundation;  either version 2.1 of the License,  or (at 
00012  * your option) any later version.
00013  *
00014  * This  program  is  distributed in  the  hope that it will  be useful,  but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00016  * or  FITNESS FOR A  PARTICULAR PURPOSE.  See the  GNU Lesser General Public  
00017  * License for more details.
00018  *
00019  * You should  have received  a copy of the GNU Lesser General Public License
00020  * along with  this program;  if not, write to the  Free Software Foundation,
00021  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00022  *
00023  * $Id: io.h,v 1.1 2005/03/07 11:16:26 Assassin Exp $
00024  */
00025 
00026 #ifndef INCLUDED_LIB3DS_TYPES_H
00027 #include <lib3ds/types.h>
00028 #endif
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 typedef enum _Lib3dsIoSeek {
00035   LIB3DS_SEEK_SET  =0,
00036   LIB3DS_SEEK_CUR  =1,
00037   LIB3DS_SEEK_END  =2
00038 } Lib3dsIoSeek;
00039   
00040 typedef Lib3dsBool (*Lib3dsIoErrorFunc)(void *self);
00041 typedef long (*Lib3dsIoSeekFunc)(void *self, long offset, Lib3dsIoSeek origin);
00042 typedef long (*Lib3dsIoTellFunc)(void *self);
00043 typedef int (*Lib3dsIoReadFunc)(void *self, Lib3dsByte *buffer, int size);
00044 typedef int (*Lib3dsIoWriteFunc)(void *self, const Lib3dsByte *buffer, int size);
00045 
00046 extern LIB3DSAPI Lib3dsIo* lib3ds_io_new(void *self, Lib3dsIoErrorFunc error_func,
00047   Lib3dsIoSeekFunc seek_func, Lib3dsIoTellFunc tell_func,
00048   Lib3dsIoReadFunc read_func, Lib3dsIoWriteFunc write_func);
00049 extern LIB3DSAPI void lib3ds_io_free(Lib3dsIo *io);
00050 extern LIB3DSAPI Lib3dsBool lib3ds_io_error(Lib3dsIo *io);
00051 extern LIB3DSAPI long lib3ds_io_seek(Lib3dsIo *io, long offset, Lib3dsIoSeek origin);
00052 extern LIB3DSAPI long lib3ds_io_tell(Lib3dsIo *io);
00053 extern LIB3DSAPI int lib3ds_io_read(Lib3dsIo *io, Lib3dsByte *buffer, int size);
00054 extern LIB3DSAPI int lib3ds_io_write(Lib3dsIo *io, const Lib3dsByte *buffer, int size);
00055 
00056 extern LIB3DSAPI Lib3dsByte lib3ds_io_read_byte(Lib3dsIo *io);
00057 extern LIB3DSAPI Lib3dsWord lib3ds_io_read_word(Lib3dsIo *io);
00058 extern LIB3DSAPI Lib3dsDword lib3ds_io_read_dword(Lib3dsIo *io);
00059 extern LIB3DSAPI Lib3dsIntb lib3ds_io_read_intb(Lib3dsIo *io);
00060 extern LIB3DSAPI Lib3dsIntw lib3ds_io_read_intw(Lib3dsIo *io);
00061 extern LIB3DSAPI Lib3dsIntd lib3ds_io_read_intd(Lib3dsIo *io);
00062 extern LIB3DSAPI Lib3dsFloat lib3ds_io_read_float(Lib3dsIo *io);
00063 extern LIB3DSAPI Lib3dsBool lib3ds_io_read_vector(Lib3dsIo *io, Lib3dsVector v);
00064 extern LIB3DSAPI Lib3dsBool lib3ds_io_read_rgb(Lib3dsIo *io, Lib3dsRgb rgb);
00065 extern LIB3DSAPI Lib3dsBool lib3ds_io_read_string(Lib3dsIo *io, char *s, int buflen);
00066 
00067 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_byte(Lib3dsIo *io, Lib3dsByte b);
00068 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_word(Lib3dsIo *io, Lib3dsWord w);
00069 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_dword(Lib3dsIo *io, Lib3dsDword d);
00070 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_intb(Lib3dsIo *io, Lib3dsIntb b);
00071 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_intw(Lib3dsIo *io, Lib3dsIntw w);
00072 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_intd(Lib3dsIo *io, Lib3dsIntd d);
00073 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_float(Lib3dsIo *io, Lib3dsFloat l);
00074 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_vector(Lib3dsIo *io, Lib3dsVector v);
00075 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_rgb(Lib3dsIo *io, Lib3dsRgb rgb);
00076 extern LIB3DSAPI Lib3dsBool lib3ds_io_write_string(Lib3dsIo *io, const char *s);
00077 
00078 #ifdef __cplusplus
00079 };
00080 #endif
00081 #endif
00082 

Generated on Mon Sep 12 19:58:48 2005 for Destiny3D by doxygen1.3-rc3